using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for QT_EXPORTDETAIL_METERIAL.
    /// </summary>
    public class QT_EXPORTDETAIL_METERIAL
    {
              private Int64 _ID;
      private DateTime _ExportDate;
      private string _BillID;
      private string _PrID;
      private double _NumberPr;
      private string _MeterialID;
      private string _MeterialUnit;
      private double _Number;
      private string _Note;
      private string _IDPOS;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetID; 
      public bool IsIDNullable   
      { 
	 get { return false;  } 
      }
      public Int64 ID
      {
         get { return _ID; }
         set 
	    { 
 		 _ID = value;
		IsSetID = true;
 	    }
      }
    public bool IsSetExportDate; 
    public bool IsExportDateNullable   
    { 
		get { return false;  } 
    }
    public DateTime ExportDate
    {
        get{ return _ExportDate;  }
        set
		{
			_ExportDate = value;
			IsSetExportDate = true;
		}
    }
    public bool IsSetBillID; 
    public bool IsBillIDNullable   
    { 
		get { return false;  } 
    }
    public string BillID
    {
        get{ return _BillID;  }
        set
		{
			_BillID = value;
			IsSetBillID = true;
		}
    }
    public bool IsSetPrID; 
    public bool IsPrIDNullable   
    { 
		get { return false;  } 
    }
    public string PrID
    {
        get{ return _PrID;  }
        set
		{
			_PrID = value;
			IsSetPrID = true;
		}
    }
    public bool IsSetNumberPr; 
    public bool IsNumberPrNullable   
    { 
		get { return false;  } 
    }
    public double NumberPr
    {
        get{ return _NumberPr;  }
        set
		{
			_NumberPr = value;
			IsSetNumberPr = true;
		}
    }
    public bool IsSetMeterialID; 
    public bool IsMeterialIDNullable   
    { 
		get { return false;  } 
    }
    public string MeterialID
    {
        get{ return _MeterialID;  }
        set
		{
			_MeterialID = value;
			IsSetMeterialID = true;
		}
    }
    public bool IsSetMeterialUnit; 
    public bool IsMeterialUnitNullable   
    { 
		get { return false;  } 
    }
    public string MeterialUnit
    {
        get{ return _MeterialUnit;  }
        set
		{
			_MeterialUnit = value;
			IsSetMeterialUnit = true;
		}
    }
    public bool IsSetNumber; 
    public bool IsNumberNullable   
    { 
		get { return false;  } 
    }
    public double Number
    {
        get{ return _Number;  }
        set
		{
			_Number = value;
			IsSetNumber = true;
		}
    }
    public bool IsSetNote; 
    public bool IsNoteNullable   
    { 
		get { return false;  } 
    }
    public string Note
    {
        get{ return _Note;  }
        set
		{
			_Note = value;
			IsSetNote = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }

        #endregion

        #region Constructors
        public QT_EXPORTDETAIL_METERIAL()
        {
            Reset();
        }
        public QT_EXPORTDETAIL_METERIAL(QT_EXPORTDETAIL_METERIAL obj)
        {
            	this._ID = obj.ID;
	this._ExportDate = obj.ExportDate;
	this._BillID = obj.BillID;
	this._PrID = obj.PrID;
	this._NumberPr = obj.NumberPr;
	this._MeterialID = obj.MeterialID;
	this._MeterialUnit = obj.MeterialUnit;
	this._Number = obj.Number;
	this._Note = obj.Note;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _ID = EmptyValues.v_Int64;
         _ExportDate = EmptyValues.v_DateTime;
         _BillID = EmptyValues.v_string;
         _PrID = EmptyValues.v_string;
         _NumberPr = EmptyValues.v_double;
         _MeterialID = EmptyValues.v_string;
         _MeterialUnit = EmptyValues.v_string;
         _Number = EmptyValues.v_double;
         _Note = EmptyValues.v_string;
         _IDPOS = EmptyValues.v_string;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ID"] is DBNull))
		{
			obj.ID = (Int64)reader["ID"];
		}
                if(!(reader["ExportDate"] is DBNull))
		{
			obj.ExportDate = (DateTime)reader["ExportDate"];
		}
                if(!(reader["BillID"] is DBNull))
		{
			obj.BillID = (string)reader["BillID"];
		}
                if(!(reader["PrID"] is DBNull))
		{
			obj.PrID = (string)reader["PrID"];
		}
                if(!(reader["NumberPr"] is DBNull))
		{
			obj.NumberPr = (double)reader["NumberPr"];
		}
                if(!(reader["MeterialID"] is DBNull))
		{
			obj.MeterialID = (string)reader["MeterialID"];
		}
                if(!(reader["MeterialUnit"] is DBNull))
		{
			obj.MeterialUnit = (string)reader["MeterialUnit"];
		}
                if(!(reader["Number"] is DBNull))
		{
			obj.Number = (double)reader["Number"];
		}
                if(!(reader["Note"] is DBNull))
		{
			obj.Note = (string)reader["Note"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _ID = (reader["ID"] is DBNull)?DalTools.EmptyValues.v_Int64:(Int64)reader["ID"];
//            _ExportDate = (reader["ExportDate"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["ExportDate"];
//            _BillID = (reader["BillID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["BillID"];
//            _PrID = (reader["PrID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["PrID"];
//            _NumberPr = (reader["NumberPr"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["NumberPr"];
//            _MeterialID = (reader["MeterialID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MeterialID"];
//            _MeterialUnit = (reader["MeterialUnit"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MeterialUnit"];
//            _Number = (reader["Number"] is DBNull)?DalTools.EmptyValues.v_double:(double)reader["Number"];
//            _Note = (reader["Note"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["Note"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int64 ID, DateTime ExportDate, string BillID, string PrID, double NumberPr, string MeterialID, string MeterialUnit, double Number, string Note, string IDPOS)
        {
                     this._ID = ID;
         this._ExportDate = ExportDate;
         this._BillID = BillID;
         this._PrID = PrID;
         this._NumberPr = NumberPr;
         this._MeterialID = MeterialID;
         this._MeterialUnit = MeterialUnit;
         this._Number = Number;
         this._Note = Note;
         this._IDPOS = IDPOS;
        }
    }
}